﻿<?xml version="1.0" encoding="utf-8" ?>
<mapper>
  <map fieldname="crm_address_preferred" defaultifnull="true" zeroisnull="true">
    <target>
      <field mapname="type" fieldname="address1_addresstypecode" />
      <field mapname="line1" fieldname="address1_line1" />
      <field mapname="line2" fieldname="address1_line2" />
      <field mapname="city" fieldname="address1_city" />
      <field mapname="state" fieldname="address1_stateorprovince" />
      <field mapname="postcode" fieldname="address1_postalcode" />
      <field mapname="country" fieldname="address1_country" />
    </target>
    <sources>
      <source value="1">
        <field mapname="type" fieldname="address2_addresstypecode" />
        <field mapname="line1" fieldname="address2_line1" />
        <field mapname="line2" fieldname="address2_line2" />
        <field mapname="city" fieldname="address2_city" />
        <field mapname="state" fieldname="address2_stateorprovince" />
        <field mapname="postcode" fieldname="address2_postalcode" />
        <field mapname="country" fieldname="address2_country" />        
      </source>
      <source value="2">
        <field mapname="type" fieldname="crm_address_other_addresstypecode" />
        <field mapname="line1" fieldname="crm_address_other_line1" />
        <field mapname="line2" fieldname="crm_address_other_line2" />
        <field mapname="city" fieldname="crm_address_other_city" />
        <field mapname="state" fieldname="crm_address_other_stateorprovince" />
        <field mapname="postcode" fieldname="crm_address_other_postalcode" />
        <field mapname="country" fieldname="crm_address_other_country" />
      </source>
    </sources>
  </map>
  <map fieldname="crm_emailaddress_preferred" defaultifnull="true" zeroisnull="true">
    <target>
      <field mapname="email" fieldname="emailaddress1" />
    </target>
    <sources>
      <source value="1">
        <field mapname="email" fieldname="emailaddress2" />
      </source>
      <source value="2">
        <field mapname="email" fieldname="emailaddress3" />
      </source>
      <source value="3">
        <field mapname="email" fieldname="crm_emailaddress_3" />
      </source>
    </sources>
  </map>
</mapper>